﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Ups</title>
    <script src="../../js/jquery.js"></script>
    <link href="../../js/uploadify/uploadify.css" rel="stylesheet" />
    <script src="../../js/uploadify/jquery.uploadify.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#imgbtn").uploadify({
                fileTypeDesc: '图片文件',
                buttonText:'图片上传',
                fileTypeExts: '*.gif; *.jpg; *.jpeg;*.png;*.png',
                multi: false,
                height: 20,
                swf: "../../js/uploadify/uploadify.swf",
                uploader: "/Upload/UploadImage?id=@ViewBag.login&n=0",
            width: 150,
            onUploadSuccess: function (file, data, response) {
                var json = eval("(" + data + ")");
                var ImageUrl = json.url;
                //$("#ImageUrl").val(json.imageurl);
                //$("#img").attr("src", json.imageurl);
                //$("#ImageName").val(json.imagename);
                window.parent.afterEdit(ImageUrl);
            }
        });
         })
    </script>
</head>
<body>
     <input  type="button" id="imgbtn"/>
</body>
</html>
